<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/Public/static/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/Public/static/css/public.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form layui-form-pane" style="width:90%;padding-left: 5%;">
	<div class="layui-form-item">
	<label class="layui-form-label" for="framecolor"><b style="color: red">* </b>框架颜色</label>
	<div class="layui-input-block">
		<input type="color" name="framecolor" id="framecolor" placeholder="框架颜色"  lay-verify="required" lay-verType="tips"   autocomplete="off"  maxlength="255" value=""  class="layui-input">
	</div>
</div><div class="layui-form-item">
	<label class="layui-form-label" for="topcolor"><b style="color: red">* </b>顶部背景</label>
	<div class="layui-input-block">
		<input type="color" name="topcolor" id="topcolor" placeholder="顶部背景"  lay-verify="required" lay-verType="tips"   autocomplete="off"  maxlength="255" value=""  class="layui-input">
	</div>
</div><div class="layui-form-item">
	<label class="layui-form-label" for="leftcolor"><b style="color: red">* </b>左侧背景</label>
	<div class="layui-input-block">
		<input type="color" name="leftcolor" id="leftcolor" placeholder="左侧背景"  lay-verify="required" lay-verType="tips"   autocomplete="off"  maxlength="255" value=""  class="layui-input">
	</div>
</div><div class="layui-form-item">
	<label class="layui-form-label" for="topbottomcolor"><b style="color: red">* </b>顶部底边</label>
	<div class="layui-input-block">
		<input type="color" name="topbottomcolor" id="topbottomcolor" placeholder="顶部底边"  lay-verify="required" lay-verType="tips"   autocomplete="off"  maxlength="255" value=""  class="layui-input">
	</div>
</div><div class="layui-form-item">
	<label class="layui-form-label" for="menucolor"><b style="color: red">* </b>三级菜单</label>
	<div class="layui-input-block">
		<input type="color" name="menucolor" id="menucolor" placeholder="三级菜单"  lay-verify="required" lay-verType="tips"   autocomplete="off"  maxlength="255" value=""  class="layui-input">
	</div>
</div><div class="layui-form-item">
	<label class="layui-form-label" for="user_id">用户ID</label>
	<div class="layui-input-block">
		<input type="number" name="user_id" id="user_id" placeholder="用户ID"  autocomplete="off"  step="1" value="0"  class="layui-input">
	</div>
</div><div class="layui-form-item">
	<label class="layui-form-label" ><b style="color: red">* </b>皮肤类型</label>
	<div class="layui-input-block">
		<input type="radio" name="state" value="1" title="系统主题"  >
<input type="radio" name="state" value="2" title="用户主题" checked >

	</div>
</div><div class="layui-form-item">
	<label class="layui-form-label" for="name"><b style="color: red">* </b>皮肤名称</label>
	<div class="layui-input-block">
		<input type="text" name="name" id="name" placeholder="皮肤名称"  lay-verify="required" lay-verType="tips"   autocomplete="off"  maxlength="255" value=""  class="layui-input">
	</div>
</div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="addData">提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script type="text/javascript" src="/Public/static/js/jquery-3.2.0.min.js"></script>
<script type="text/javascript" src="/Public/static/layui/layui.js"></script>
<script type="text/javascript">
    layui.use(['form','layer','laydate','upload','layedit'],function(){
        let form = layui.form,
		laydate = layui.laydate,
		upload = layui.upload,
            layedit = layui.layedit,
        layer = parent.layer === undefined ? layui.layer : top.layer;

        

        form.on("submit(addData)",function(){
            let index = layer.msg('数据提交中，请稍候',{icon: 16,time:false});
            $.post("/admin/Systemskin/add",{para:$('form').serialize()},function(res){
                window.parent.window.parent.toast(res.info,res.code);
                layer.close(index);
                if(0 === res.code){
                    parent.layer.closeAll();
                    window.parent.tablist.reload();
                }
            });
            return false;
        });
    });
</script>
</body>
</html>